#include "threadPool.h"

int initThreadPool(int workNum, threadPool_t *pthreadPool) {
    pthreadPool->workerNum = workNum;
    pthreadPool->tidArr = (pthread_t *)calloc(workNum, sizeof(pthread_t));
    initTaskQueue(&pthreadPool->taskQueue);
    pthread_mutex_init(&pthreadPool->mutex, NULL);
    pthread_cond_init(&pthreadPool->cond, NULL);
    return 0;
}
